package RepeateAnno;


import org.junit.Test;

import java.lang.annotation.Annotation;
import java.lang.reflect.Method;

public class TestAnnotation {


    @Test
    public void test1() throws NoSuchMethodException {
        Class<TestAnnotation> testAnnotationClass = TestAnnotation.class;
        Method show = testAnnotationClass.getMethod("show");
        MyAnno[] annotationsByType = show.getAnnotationsByType(MyAnno.class);
        for (MyAnno myAnno : annotationsByType) {
            System.out.println(myAnno.value());
        }
    }

    @MyAnno("Hello")
    @MyAnno("World")
    public void show(){

    }
}
